package com.ruoyi.busi.guide.service.impl;

import com.ruoyi.busi.guide.domain.Student;
import com.ruoyi.busi.guide.mapper.StudentMapper;
import com.ruoyi.busi.guide.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 学生信息Service业务层处理
 */
@Service
public class StudentServiceImpl implements IStudentService {

    @Autowired
    private StudentMapper studentMapper;

    public List<Student> selectByMentorId(Long mentorId) {
        return studentMapper.selectByMentorId(mentorId);
    }

    public boolean deleteStudentByIds(List<Long> studentIds) {
        return studentMapper.deleteStudentsByIds(studentIds) > 0;
    }

    @Override
    public boolean save(Student student) {
        return studentMapper.insert(student) > 0;
    }

    @Override
    public boolean updateById(Student student) {
        return studentMapper.updateById(student) > 0;
    }
}
